format compact
E = 200*10^9;I = 118.6*10^-6;
L1 = 5;L2 = 2.5;
% cal element stiffness
k1 = Beam1D2Node_Stiffness(E,I,L1);
k2 = Beam1D2Node_Stiffness(E,I,L2);
% stiffness assembly
KK = zeros(6,6);
KK = Beam1D2Node_Assembly(KK,k1,1,2);
KK = Beam1D2Node_Assembly(KK,k2,2,3)
% cal displacement
k = KK(4:6,4:6);
p = [39062;-31250;13021];
u = k\p
% cal node force
U = [0;0;0;u];
P = KK*U
% cal RF
F = [-62500;-52083;-93750;39062;-31250;13021];
RF = P-F
